package com.android.application;

import java.util.*;

import com.forecasting.model.PartNumber;

import android.app.Application;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.preference.PreferenceManager;
import android.util.Log;

public class ForecastApplication extends Application implements
		OnSharedPreferenceChangeListener {
	
	private static final String TAG = ForecastApplication.class.getSimpleName();
	
	private SortedSet<PartNumber> pnList;
	private SharedPreferences prefs;
	
	@Override
	public void onCreate() { //
		super.onCreate();
		this.pnList =  new TreeSet<PartNumber>();
		this.prefs = PreferenceManager.getDefaultSharedPreferences(this);
		this.prefs.registerOnSharedPreferenceChangeListener(this);
		Log.i(TAG, "onCreated");
	}
	@Override
	public void onTerminate() { //
		super.onTerminate();
		Log.i(TAG, "onTerminated");
	}
	public SortedSet<PartNumber> getPNList(){
		return pnList;
	}
	
	@Override
	public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
		
	}

}
